//引入封装好的接口
import { getMemberList } from "../../../request/api";
const state = {
    memberlist: [],
}; 
const getters = {
    getMemberList(state) {
        return state.memberlist;
    },
};

const mutations = {
    REQ_LIST(state, payload) {
        state.memberlist = payload;
    },
};

const actions = {
    //列表行动
    getMemberListAction({ commit }) {
        getMemberList()
            .then(res => {
                if (res.code == 200) {
                    commit('REQ_LIST', res.list)
                }
            })
    }
};

export default {
    state,
    getters,
    actions,
    mutations,
    namespaced: true,
};